﻿using SQLite;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace mBook.Models
{
    public class Ebook
    {
        private String mediaID;
        [PrimaryKey]
        public String MediaId
        {
            get { return mediaID; }
            set { mediaID = value; }
        }

        private String dateBuy;

        public String DateBuy
        {
            get { return dateBuy; }
            set { dateBuy = value; }
        }

        private String author;

        public String Author
        {
            get { return author; }
            set { author = value; }
        }

        private String categoryID;

        public String CategoryId
        {
            get { return categoryID; }
            set { categoryID = value; }
        }

        private String description;

        public String Description
        {
            get { return description; }
            set {
                //value = value.Replace(Environment.NewLine, " ");
                value = value.Replace(Environment.NewLine + Environment.NewLine, "***");
                value = value.Replace(Environment.NewLine, " ");
                value = value.Replace("***", Environment.NewLine);
                description = value; 
            }
        }

        private String encryptUrl;

        public String EncryptUrl
        {
            get { return encryptUrl; }
            set { encryptUrl = value; }
        }

        private String typeFile;

        public String FileType
        {
            get { return typeFile; }
            set { typeFile = value; }
        }

        private String images;

        public String Images
        {
            get { return images; }
            set { images = value; }
        }

        private String isFree;

        public String IsFree
        {
            get { return isFree; }
            set { isFree = value; }
        }

        private String name;

        public String Name
        {
            get { return name; }
            set { name = value; }
        }

        private String numberOfLike;

        public String NumberOfLiked
        {
            get { return numberOfLike; }
            set { numberOfLike = value; }
        }

        private String numberOfPaid;

        public String NumberOfPaid
        {
            get { return numberOfPaid; }
            set { numberOfPaid = value; }
        }

        private String numberOfRate;

        public String NumberOfRate
        {
            get { return numberOfRate; }
            set { numberOfRate = value; }
        }

        private String page;

        public String Page
        {
            get { return page; }
            set { page = value; }
        }

        private String password;

        public String Password
        {
            get { return password; }
            set { password = value; }
        }

        private String price;

        public String Price
        {
            get { return price; }
            set { price = value; }
        }

        private String publisher;

        public String Publisher
        {
            get { return publisher; }
            set { publisher = value; }
        }

        private float rateLevel;

        public float RateLevel
        {
            get { return rateLevel; }
            set { rateLevel = value; }
        }

        private String release;

        public String Release
        {
            get { return release; }
            set { release = value; }
        }

        private String requireInfo;

        public String RequireInfo
        {
            get { return requireInfo; }
            set { requireInfo = value; }
        }

        private String summary;

        public String Summary
        {
            get { return summary; }
            set { summary = value; }
        }

        private String trailerUrl;

        public String TrailerUrl
        {
            get { return trailerUrl; }
            set { trailerUrl = value; }
        }

        private String volume;

        public String Volume
        {
            get { return volume; }
            set { volume = value; }
        }

        private String filePath;

        public String FilePath
        {
            get { return filePath; }
            set { filePath = value; }
        }

        private int currentPage = 0;

        public int CurrentPage
        {
            get { return currentPage; }
            set { currentPage = value; }
        }

    }
}
